Skip to content

test(migration): read reserved words per database version from upstream sources (stable2.1 backport of #9991) - #10153

Merged
rjzondervan merged 2 commits into
stable2.1from
hotfix/stable2.1-9991-reserved-words
Nov 13, 2026
Merged

rjzondervan merged 2 commits into
stable2.1from
hotfix/stable2.1-9991-reserved-words

Conversation

@WilcoLouwerse

@WilcoLouwerse WilcoLouwerse commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Backport of #9991 to the release line stable2.1. Test code only; no change under lib/.

  • ReservedColumnNamesTest no longer checks against two fixed word lists. The reserved words per MariaDB and MySQL series come from the upstream sources: the series' branch head plus every release tag.
  • Ten committed snapshots (MariaDB 10.5, 10.6, 10.11, 11.3, 11.4, 11.8, main; MySQL 8.0, 8.4, trunk) are the offline fallback, and tests/Unit/Migration/fixtures/update-reserved-words.php regenerates them.
  • A new reserved word on a development branch (main, trunk) is reported as incomplete, not as a failure.
  • tests/Support/ReservedWordSource.php holds the parser and the download handling.

Difference from #9991

tests/Unit/Db/ImportPreviewRowMapperMigratedTest.php is left as it is on stable2.1. The version on main calls findByPreview() with a ListQuery, a signature this line does not have. Of the 13 changed files, 12 are identical to the merge commit of #9991 (c457f76).

tests/Unit/Migration/ReservedColumnNamesTest.php differs in one docblock sentence: it says again that the test needs a Nextcloud server's classes. On main MigratedSqliteDatabase has a fallback for a bare clone; on stable2.1 it does not.

The mapper-level regression test for source_row that #9991 changed therefore stays in its stable2.1 form.

The /backport to stable2.1 run on #9991 stayed queued and was cancelled; this branch replaces it.

Checks

  • Not run locally: PHPUnit (the worktree has no Nextcloud tree or vendor/). CI on this PR is the evidence.
  • Compared: 12 of the 13 changed files against c457f76, byte-identical; the thirteenth differs only in the docblock sentence above.
  • Static check: the reserved-word columns in the migrations on stable2.1 equal the test's allowance list (cursor groups limit offset schema schemas trigger).

Test plan

  • CI passes, in particular the PHPUnit jobs that run tests/Unit/Migration/ReservedColumnNamesTest.php

Refs #4909

🤖 Generated with Claude Code

WilcoLouwerse and others added 2 commits November 13, 2026 13:01
…am sources (stable2.1 backport of #9991)

Brings the reserved-word test of #9991 to the release line: the lists per
MariaDB and MySQL series come from the upstream sources (branch head plus
every release tag), with committed snapshots as the offline fallback.

The mapper test stays as it is on stable2.1: the version on main uses the
ListQuery signature that this line does not have.

(taken from the test files of c457f76)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…on stable2.1

On this line MigratedSqliteDatabase has no fallback for a bare clone, so the
sentence #9991 dropped still holds here.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@WilcoLouwerse WilcoLouwerse left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE (Quick · backport)

Self-review of my own PR, so posted as a comment. Reviewed on head 9fd391e.

No 🔴 or 🟡 findings. One 🟢 was fixed before this verdict.

# Sev Finding State
f1 🟢 The test header no longer said that the test needs a Nextcloud server. True on main, where MigratedSqliteDatabase has a fallback for a bare clone; not on stable2.1, where it still throws. Fixed in 9fd391e (sentence restored)

What was checked

  • Diff: 12 of the 13 files are byte-identical to the merge commit of #9991 (c457f76); the thirteenth differs in the one docblock sentence of f1. Nothing else changed against stable2.1.
  • Fits on stable2.1: MigratedSqliteDatabase::migratedSchema() has the same signature, autoload-dev maps tests/, phpunit.xml and phpunit-unit.xml include tests/Unit, and doctrine/dbal (3.10.5) and PHPUnit (10.5.63) are the same as on main.
  • Migrations on stable2.1: a static scan of the column names against the ten snapshots gives cursor groups limit offset schema schemas trigger, which equals the allowance list. The four migrations that only main has add no reserved column.
  • Old fixtures: rewritten in place; no other test on stable2.1 reads them.

Not checked

  • The test was not run: the worktree has no vendor/ and no Nextcloud tree. CI on this head is the evidence, and at the time of writing its checks had not started.
  • Columns named through a variable or created by raw SQL, beyond the two migrations the test header already names.
  • The mapper-level source_row test of #9991 is not part of this backport (the PR description says why), so that coverage stays in its stable2.1 form.

@rjzondervan
rjzondervan merged commit 5fceb6a into stable2.1 Nov 13, 2026
8 checks passed
@WilcoLouwerse
WilcoLouwerse deleted the hotfix/stable2.1-9991-reserved-words branch November 13, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants